package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.ListBean;
import com.cskaoyan.bean.admin.DashBoardVO;
import com.cskaoyan.service.AdminService1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("admin")
public class AdminController {

    @Autowired
    AdminService1 adminService;

    @RequestMapping("address/list")
    public BaseRespVo address(Integer page,Integer limit,String name,Integer userId, String sort, String order){
        ListBean listBean = adminService.queryAdminAddressBean(page,limit,name,userId,sort,order);
        return BaseRespVo.ok(listBean);
    }

//    @RequestMapping("dashboard")
//    public BaseRespVo dashboard() {
//        DashBoardVO dashBoardVO = adminService.dashboard();
//        return BaseRespVo.ok(dashBoardVO);
//    }

}
